﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

</head>
<!-- end header -->
<body>
  <div class="page-group">
    <div class="page page-current">

      <header class="bar bar-nav fs-header-small">
        <c:choose>
          <c:when test="${not empty scheduleId or back eq 'student'}">
            <a href="${ctx.host}/students/${courseRound.student.id}/rounds/${courseRound.id}${not empty scheduleId ? '?scheduleId=' : ''}${scheduleId}" class="icon icon-left pull-left"></a>
          </c:when>
          <c:otherwise>
            <a href="${ctx.host}/rounds/${courseRound.id}?type=${courseRound.roundCoursewareStatus}" class="icon icon-left pull-left"></a>
          </c:otherwise>
        </c:choose>
        <h1 class="title">身体数据</h1>
      </header>

      <div class="content">
        <div class="buttons-tab course-tab">
          <a href="javascript:void(0);" class="button active">inbody数据</a>
          <a href="${ctx.host}/rounds/${courseRound.id}/bwh-records<c:if test='${not empty scheduleId or not empty back}'>?${not empty scheduleId ? 'scheduleId' : 'back'}=${not empty scheduleId ? scheduleId : back}</c:if>" class="button">三围数据</a>
        </div>
        
        <c:if test="${empty inbodyRecords}">
          <div class="list-block media-list" style="margin-top:1.2rem">
            <p class="text-center">暂无符合条件的Inbody记录</p>
          </div>        
        </c:if>
        
        <c:if test="${not empty inbodyRecords}">
            <c:forEach var="record" items="${inbodyRecords}">
                <div class="content-block-title record-title text-center">
                  <span>${record.recordTime}</span>
                </div>
                
                <div class="list-block">
                  <ul>
                    <li class="item-content">
                      <div class="item-inner">
                        <div class="item-title">BMI</div>
                        <div class="item-after">${record.bmi}</div>
                      </div>
                    </li>
                    <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">体脂肪</div>
                      <div class="item-after">${record.bf}</div>
                    </div>
                  </li>
                  <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">体脂率</div>
                      <div class="item-after"><fmt:formatNumber value="${record.bfr}" pattern="0.00"/></div>
                    </div>
                  </li>
                  <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">腰臀比</div>
                      <div class="item-after">${record.whr}</div>
                    </div>
                  </li>
                    <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">体重</div>
                      <div class="item-after">${record.weight}</div>
                    </div>
                  </li>
                  <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">骨骼肌</div>
                      <div class="item-after">${record.sm}</div>
                    </div>
                  </li>
                  <li class="item-content">
                    <div class="item-inner">
                      <div class="item-title">基础代谢</div>
                      <div class="item-after">${record.bm}</div>
                    </div>
                  </li>
                  </ul>
                </div>
            </c:forEach>
        </c:if>
        
      </div>

    </div>
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>

</body>
</html>